const chartDom = document.getElementById('myChart');
const myChart = echarts.init(chartDom);
window.addEventListener('resize', function() {
    myChart.resize();
});
let option;

option = {
    title: {
        text: '所有学员分数分布占比',
        left: 'center'
    },
    tooltip: {
        trigger: 'item'
    },
    legend: {
        orient: 'vertical',
        left: 'left',
        top: 'center'
    },
    series: [
        {
            name: '分数',
            type: 'pie',
            radius: '70%',
            data: [
                { value: 1048, name: '大于80' },
                { value: 735, name: '大于70' },
                { value: 580, name: '大于60' },
                { value: 484, name: '大于50' },
                { value: 300, name: '大于40' },
                { value: 300, name: '小于40'},
            ],
            emphasis: {
                itemStyle: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        },
    ]

};

option && myChart.setOption(option);



